1. Field of the Invention
The present invention relates to a median filter by which a signal sequence is replaced by the signal representing the middle value (median) in a signal group which is formed by the signal to be replaced as well as by a plurality of signals occurring before and after the middle value.
2. Description of the Related Art
A median filter replaces a signal sequence by a signal that represents the median value in a signal group that includes a signal to be replaced along with N/2 signals that occur immediately before the signal to be replaced and N/2 signals that occur immediately after the signal to be replaced, where N is an even integer and specifies the degree of the filter. The signals received at the input are fed to a cascade of delay elements whose number is equal to the degree of the median filter, so that upon receipt of a signal at the input, the N preceding signals appear at the outputs of the delay elements. The median of the signal group is determined in a selection unit and is switched to the output of the median filter.
A median filter thus sorts a number of signals in order of amplitude and replaces the current value by the middle value (median) of the sorted signal sequence. Median filters are time-discrete, nonlinear filters. Median filters have repeatedly been proposed for use with television signals (see, for example, P. Maragos and R. W. Schafer, "Morphological Filters-Part II: Their Relations to Median, Order-Statistic, and Stack Filters", "IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING", Vol. ASSP-35, No. 8, August 1987, pp. 1170-1183; A. Rosenfeld and A. C. Kak, "Digital Picture Processing", 2nd Ed., Vol. 1, 1982, pp. 261-265; and Helmut Schonfelder, "Digitale Filter in der Videotechnik" (1988), pp. 125, 126, 224-226). Median filters suppress signal changes of short duration (i.e., mainly noise) while transmitting signal-level changes of longer duration, such as step and ramp edges, without distortion.
To determine the median of the signal sequence, each value of a signal group must be compared with every other value of the signal groups, and the results of these comparisons must be processed by logic circuitry. This is very complicated and costly.
It is the object of the invention to provide a simplified circuit for a median filter of the above kind.